#ifndef _EDITOR_H_
#define _EDITOR_H_

#include "cocos2d.h"
#include "cocos-ext.h"
USING_NS_CC;
using namespace std;

class MazeInfo;
//class StepInfo;
class Editor : public cocos2d::CCLayer
{
public:
	virtual bool init();  
	virtual void onEnter();

	// there's no 'id' in cpp, so we recommend returning the class instance pointer
	static cocos2d::CCScene* scene( );
	void returnMainMenu(CCObject* pSender);
	virtual bool ccTouchBegan(CCTouch* touch, CCEvent* event);
	virtual void ccTouchMoved(CCTouch* touch, CCEvent* event);
	virtual void ccTouchEnded(CCTouch* touch, CCEvent* event);

	void save(CCObject* pSender);
	bool check();
	void loadLevel(int l);
	void displayAnsOps(int l, int s);
	void loadLastStep(CCObject* pSender);
	void loadNextStep(CCObject* pSender);
	void loadLastLevel(CCObject* pSender);
	void loadNextLevel(CCObject* pSender);

	int nextLevel;
	MazeInfo *curmi;
	//StepInfo *cursi;
	CCArray *names;
	CCPoint selectedPoint;
	CCArray *selectedImage;
	int seleceMode; 
	CCArray *quesArr, *ansArr, *optArr;
	int curLevel, curStep;
	CREATE_FUNC(Editor);
};

#endif